#!/usr/bin/env zunit

# @test 'zinit-annex-as-monitor' {
#   local annex="zinit-annex-as-monitor"
#   run zinit load zdharma-continuum/$annex
#   assert $state equals 0
#   zinit cd zdharma-continuum/$annex
#   assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_file
#   assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_readable
# }
@test 'zinit-annex-bin-gem-node' {
  local annex="zinit-annex-bin-gem-node"
  run zinit load zdharma-continuum/$annex
  assert $state equals 0
  zinit cd zdharma-continuum/$annex
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_file
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_readable
}
@test 'zinit-annex-binary-symlink' {
  local annex="zinit-annex-binary-symlink"
  run zinit load zdharma-continuum/$annex
  assert $state equals 0
  zinit cd zdharma-continuum/$annex
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_file
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_readable
}
@test 'zinit-annex-man' {
  local annex="zinit-annex-man"
  run zinit load zdharma-continuum/$annex
  assert $state equals 0
  zinit cd zdharma-continuum/$annex
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_file
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_readable
}
@test 'zinit-annex-meta-plugins' {
  local annex="zinit-annex-test"
  run zinit load zdharma-continuum/$annex
  assert $state equals 0
  zinit cd zdharma-continuum/$annex
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_file
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_readable
}
@test 'zinit-annex-patch-dl' {
  local annex="zinit-annex-patch-dl"
  run zinit load zdharma-continuum/$annex
  assert $state equals 0
  zinit cd zdharma-continuum/$annex
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_file
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_readable
}
@test 'zinit-annex-readurl' {
  local annex="zinit-annex-readurl"
  run zinit load zdharma-continuum/$annex
  assert $state equals 0
  zinit cd zdharma-continuum/$annex
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_file
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_readable
}
@test 'zinit-annex-rust' {
  local annex="zinit-annex-rust"
  run zinit load zdharma-continuum/$annex
  assert $state equals 0
  zinit cd zdharma-continuum/$annex
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_file
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_readable
}
@test 'zinit-annex-submods' {
  local annex="zinit-annex-submods"
  run zinit load zdharma-continuum/$annex
  assert $state equals 0
  zinit cd zdharma-continuum/$annex
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_file
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_readable
}
@test 'zinit-annex-test' {
  local annex="zinit-annex-test"
  run zinit load zdharma-continuum/$annex
  assert $state equals 0
  zinit cd zdharma-continuum/$annex
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_file
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_readable
}
@test 'zinit-annex-unscope' {
  local annex="zinit-annex-test"
  run zinit load zdharma-continuum/$annex
  assert $state equals 0
  zinit cd zdharma-continuum/$annex
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_file
  assert "$PWD/${annex//zinit-annex/z-a}.plugin.zsh" is_readable
}

# vim:ft=zsh:sw=2:sts=2:et:foldmarker=@test,}:foldmethod=marker
